package other_其他模式.DAO_data_access_object_数据访问对象模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/10/11:09
 * @Description:
 */
public class DAOPatternDemo {
	public static void main(String[] args) {
		StudentDao studentDao = new StudentDaoImpl();
		//获取全部
		System.err.println(studentDao.getAll());
		//获取id2
		System.err.println(studentDao.getById(2));
		//更新2
		studentDao.updateById(new Student(2, "sssss"));
		//获取全部
		System.err.println(studentDao.getAll());
	}
}
